public class Main {
    public static void main(String[] args) {
        Baby baby1 = new Baby("miky");
        baby1.climbing();
        baby1.fly();
        baby1.swim();
    }
}
class Monkey{
    public String name;
    public Monkey(String name) {
        this.name = name;
    }
    public void climbing(){
        System.out.println("猴子会爬树");
    }
}

//接口
interface Bird{
    void fly();
}
interface Fish{
    void swim();
}
//继承
class Baby extends Monkey implements Fish, Bird{
    public Baby(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println("猴子宝宝向鸟学习了飞翔");
    }

    @Override
    public void swim() {
        System.out.println("猴子宝宝向鱼学习了游泳");
    }
}

